<!DOCTYPE>
<html>
@include('common.head')
<body style="background-color: #fff !important">
<meta name="csrf-token" content="{{ csrf_token() }}">
<div class="compylice" id="j-compyLice">  	
	<div class="row-fluid">
		<div class="span12">
			<form action="/verify/verifyMatreial" id="form_compyness" class="form-horizontal padding-top-20" method="post" enctype="multipart/form-data">
				<input type="hidden" name="_token" value="{{csrf_token()}}">
				<input type="hidden" name="id" value="{{$rs['id']}}">
				<input type="hidden" name="field" value="{{$rs['field']}}">
				<div class="control-group">
					<label class="control-label tanwid">上传图片</label>
					<div class="uploader controls">
					    <input type="text" class="span7 twoupfile filename" name="twoupfile" readonly/>
					    <input type="button" name="file" class="button" value="上传..."/>
					    <input id="transport" name="transport" class="button" type="file" size="30"/>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label tanwid">运输证编号</label>
					<div class="controls">
						<input type="text" class="span8 m-wrap c-rake" autocomplete="off" name="transport_code" placeholder="运输证编号">
					</div>
				</div>
				<div class="control-group">
					<label class="control-label tanwid">购买证编码</label>
					<div class="controls">
						<input type="text" class="span8 m-wrap c-rake" autocomplete="off" name="shop_card_code" placeholder="购买证编码">
					</div>
				</div>
				<div class="control-group">
					<label class="control-label tanwid">购买商品</label>
					<div class="controls">
						<input type="text" class="span8 m-wrap c-rake" autocomplete="off" name="product_id" placeholder="购买商品">
					</div>
				</div>
				<div class="control-group">
					<label class="control-label tanwid">允许的商品规格</label>
					<div class="controls mlft">			
						<input type="text" class="span4 input-control m-wrap c-pardname" autocomplete="off" name="product_size" placeholder="15">/
						<select class="span4 m-wrap c-cardterm" name="product_standard" style="border-radius: 0 ">
							<option value="">请选择</option>
							<option value="ml">ml</option>
							<option value="升">升</option>
							<option value="千克">千克</option>
							<option value="吨">吨</option>
						</select>
					</div>			
				</div>
				<div class="control-group">
					<label class="control-label tanwid">开始时间</label>
					<div class="controls">
						<input placeholder="开始时间" class="span8 c-begintime" type="text" name="stime" id="stime">
					</div>		
				</div>
				<div class="control-group">
					<label class="control-label tanwid">截止时间</label>
					<div class="controls">
						<input placeholder="截止时间" class="span8 c-begintime" type="text" name="etime" id="etime">
					</div>		
				</div>
			</form>
			{{-- <div class="publay_butom">			
				<a class="laysure-btn0" id="j-ticationok" href="javascript:dosubmit();">认证通过</a>		
				<a class="laycols-btn1" id="j-ticationnot">认证不通过</a>		
			</div> --}}
		</div>
	</div>
</div>
</body>
<script src="{{URL::asset('static/js/bootstrap/bootstrap-datepicker.min.js')}}"></script>
<script src="{{URL::asset('static/js/bootstrap/bootstrap-datepicker.zh-CN.min.js')}}"></script>
<link rel="stylesheet" href="{{URL::asset('static/style/bootstrap/bootstrap-datepicker3.standalone.min.css')}}">
<script type="text/javascript">
	function closedHandler(){
		var index = parent.layer.getFrameIndex(window.name);
		//刷新父层
		parent.location.reload();
		//关闭弹出层
		// parent.layer.close(index);
	}
	function dosubmit(){
		var transport = $('#transport').val();
		var transport_code = $('input[name="transport_code"]').val();
		var shop_card_code = $('input[name="shop_card_code"]').val();
		var product_id = $('input[name="product_id"]').val();
		var product_size = $('input[name="product_size"]').val();
		var product_standard = $('select[name="product_standard"]').val();
		var stime = $('input[name="stime"]').val();
		var etime = $('input[name="etime"]').val();

		if(transport == ''){
			layer.msg("图片不能为空",{icon:2,time:1500});
			return false;
		}
		if(transport_code == ''){
			layer.msg("运输证编号不能为空",{icon:2,time:1500});
			return false;
		}
		if(shop_card_code == ''){
			layer.msg("购买证编号不能为空",{icon:2,time:1500});
			return false;
		}
		if(product_id == ''){
			layer.msg("购买商品不能为空",{icon:2,time:1500});
			return false;
		}
		if(product_size == ''){
			layer.msg("商品规格不能为空",{icon:2,time:1500});
			return false;
		}
		if(product_standard == ''){
			layer.msg("商品规格不能为空",{icon:2,time:1500});
			return false;
		}
		if(stime == ''){
			layer.msg("开始时间不能为空",{icon:2,time:1500});
			return false;
		}
		if(etime == ''){
			layer.msg("截止时间不能为空",{icon:2,time:1500});
			return false;
		}

		$('#form_compyness').submit();
	}
	$(".uploader input[type=file]").change(function(){
		$(this).parents(".uploader").find(".filename").val($(this).val());
	});
	function dataTimeSelect(start){//日期范围
	    $('#'+start).datetimepicker({
	        minView: "month",//设置只显示到月份
	        autoclose : true,
	        todayHighlight : true,
	        // endDate : new Date(),
	        format:'yyyy-mm-dd',
	        language:'zh-CN'
	    });
	}
	dataTimeSelect('stime');
	dataTimeSelect('etime');
</script>
</html>